<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
String path = request.getContextPath();
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>新增用户</title>
  </head>
  
  <body>
	<div class="pageContent">
		<form method="post" action="<%=path %>/user/saveUser.action" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
			<div class="pageFormContent" layoutH="56">
				<p>
					<label>账号：</label>
					<input name="userVO.account" class="required" type="text" size="30" alt="请输入账号"/>
				</p>
				<p>
					<label>姓名：</label>
					<input name="userVO.name" class="required" type="text" size="30"  alt="请输入名称"/>
				</p>
				<p>
					<label>角色：</label>
					<select name="userVO.role">
                        <option value="">选择角色</option>
                        <c:forEach var="item" items="${roles}">
                        	<option value="${item.id}" ${userVO.role eq item.id?"selected":"" }>${item.name}</option>
                        </c:forEach>
                  </select>
				</p>
				<p>
					<label>密码：</label>
					<input name="userVO.password" class="required" type="text" size="30"  alt="请输入密码"/>
				</p>
				<p>
					<label>工号ID：</label>
					<input name="userVO.employId"  class="required" type="text" size="30" alt="请输入工号ID"/>
				</p>
				<p>
					<label>联系电话：</label>
					<input name="userVO.tel"  class="phone" type="text" size="30" alt="请输入联系电话"/>
				</p>
				<p>
					<label>联系邮件：</label>
					<input name="userVO.email"   class=”email” type="text" size="30" alt="请输入联系邮件"/>
				</p>
				<p>
					<label>商家：</label>
					<input type="hidden" value="${SESSION_USER.customer==null?'':(SESSION_USER.customer.id)}" id="userCustomerId" name="userVO.customer.id"/>
					<input type="hidden" value="${SESSION_USER.customer==null?'':(SESSION_USER.customer.id)}" name="userVO.customerId" id="uId" />
					<input name="userVO.customerName" value="${SESSION_USER.customer==null?'':(SESSION_USER.customer.name)}" type="text" style="width:200px" readonly="readonly" tit="请选择商家！" class="required"/>
					<c:if test="${SESSION_USER.customer==null}">
						<a id="a_link_id_look_1" class="btnLook" href="<%=path%>/customer/listCustomer.action?searchType=active" lookupGroup="userVO"></a>
					</c:if>
				</p>
			</div>
			<div class="formBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
					<li>
						<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
					</li>
				</ul>
			</div>
		</form>
	</div>
  </body>
</html>
